package com.shf.film.flex;


import org.springframework.flex.core.MessageInterceptor;
import org.springframework.flex.core.MessageProcessingContext;

import flex.messaging.messages.Message;

/**
 * 请求拦截器
 * 
 * 可以在调用service方法前和后处理一请求或者响应
 * 
 * @author liucf
 *
 */
public class MyMessageInterceptor implements MessageInterceptor {

	/**
	 * 响应请求时
	 */
	@Override
	public Message postProcess(MessageProcessingContext arg0, Message arg1,
			Message arg2) {
		System.out.println("post拦截!");
		return arg2;
	}

	/**
	 * 接受请求时
	 */
	@Override
	public Message preProcess(MessageProcessingContext arg0, Message arg1) {
		System.out.println("pre拦截!");
		return arg1;
	}

	
}
